package de.vocabulary.client.editor;

import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.rpc.ServiceDefTarget;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.SimpleCheckBox;

import de.vocabulary.client.service.MyVocabularyCallback;
import de.vocabulary.client.service.VocabularyService;
import de.vocabulary.client.service.VocabularyServiceAsync;
import de.vocabulary.shared.model.LanguageModule;

//@TODO only sceleton so far...

public class EditVocabularyDB extends Composite{
	private VocabularyServiceAsync service;

	protected void onLoad(){
		//initialize with initial vocabulary
		service = 
				(VocabularyServiceAsync) GWT.create(VocabularyService.class);
		ServiceDefTarget serviceDef = (ServiceDefTarget) service;
		serviceDef.setServiceEntryPoint(GWT.getModuleBaseURL()
				+ "vocabularyService");

		//@TODO change
		VocableTable table = new VocableTable();
		MyVocabularyCallback myUserCallback = new MyVocabularyCallback(table, true);
		service.getVocabularyList(myUserCallback);
	}
}
